

public class FindIndex {
	public static void main(String[] args) {
		int[] a = {1, 2, 3, 4, 6, 9, 23, 56 };
		int i = 0;
		for(; i < a.length; i++)
			if( a[i] == 56 ) break;
		if(i < a.length) 
			System.out.println("The index of 56 is " +i);
		else
			System.out.println("The array don't have 56!");
	}
}
		